package cn.edu.cqytxy.controller;

import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * spring mvc的接口示例
 *
 * @author yinjw
 */
@RestController
public class FirstController {

    @GetMapping("/test1")
    public String test1() {
        return "hello world";
    }

    @GetMapping("/test2")
    public String test2(String name) {
        return name;
    }

    @PostMapping("/test3")
    public String test3(String name) {
        return name;
    }

    @GetMapping("/test4/{id}")
    public String test4(@PathVariable("id") Integer id) {
        return id + "";
    }
}
